<!DOCTYPE html>
<html lang="zh-CN" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>Student</title>
    <link rel="shortcut icon" th:href="@{/img/favicon.jpg}" type="image/x-icon">
    <title>PearAdminLayUI</title>
    <!-- 依赖样式 -->
    <link rel="stylesheet" th:href="@{pearAdminLayUI/component/pear/css/pear.css}" />
    <!-- 加载样式 -->
    <link rel="stylesheet" th:href="@{pearAdminLayUI/admin/css/loader.css}" />
    <!-- 布局样式 -->
    <link rel="stylesheet" th:href="@{pearAdminLayUI/admin/css/admin.css}" />
</head>
<!-- 结构代码 -->
<body class="layui-layout-body pear-admin">
<!-- 布局框架 -->
<div class="layui-layout layui-layout-admin">
    <!-- 顶部样式 -->
    <div class="layui-header">
        <!-- 菜单顶部 -->
        <div class="layui-logo">
            <!-- 图标 -->
            <img class="logo">
            <!-- 标题 -->
            <span class="title"></span>
        </div>
        <!-- 顶部左侧功能 -->
        <ul class="layui-nav layui-layout-left">
            <li class="collapse layui-nav-item"><a href="#" class="layui-icon layui-icon-shrink-right"></a></li>
            <li class="refresh layui-nav-item"><a href="#" class="layui-icon layui-icon-refresh-1" loading = 600></a></li>
        </ul>
        <!-- 多系统菜单 -->
        <div id="control" class="layui-layout-control"></div>
        <!-- 顶部右侧菜单 -->
        <ul class="layui-nav layui-layout-right">
            <li class="layui-nav-item layui-hide-xs"><a href="#" class="menuSearch layui-icon layui-icon-search"></a></li>
            <li class="layui-nav-item layui-hide-xs"><a href="#" class="fullScreen layui-icon layui-icon-screen-full"></a></li>
            <li class="layui-nav-item layui-hide-xs"><a href="http://www.pearadmin.com" class="layui-icon layui-icon-website"></a></li>
            <li class="layui-nav-item layui-hide-xs message"></li>
            <li class="layui-nav-item user">
                <!-- 头像 -->
                <a class="layui-icon layui-icon-username" href="javascript:;"></a>
                <!-- 功能菜单 -->
                <dl class="layui-nav-child">
                    <dd><a user-menu-url="pearAdminLayUI/view/system/person.html" user-menu-id="5555" user-menu-title="基本资料">基本资料</a></dd>
                    <dd><a href="javascript:void(0);" class="logout">注销登录</a></dd>
                </dl>
            </li>
            <!-- 主题配置 -->
            <li class="layui-nav-item setting"><a href="#" class="layui-icon layui-icon-more-vertical"></a></li>
        </ul>
    </div>
    <!-- 侧边区域 -->
    <div class="layui-side layui-bg-black">
        <!-- 菜单顶部 -->
        <div class="layui-logo">
            <!-- 图标 -->
            <img class="logo">
            <!-- 标题 -->
            <span class="title"></span>
        </div>
        <!-- 菜单内容 -->
        <div class="layui-side-scroll">
            <div id="sideMenu"></div>
        </div>
    </div>
    <!-- 视图页面 -->
    <div class="layui-body">
        <!-- 内容页面 -->
        <div id="content"></div>
    </div>
    <!-- 页脚 -->
    <div class="layui-footer layui-text">
				<span class="left">
					Released under the MIT license.
				</span>
        <span class="center"></span>
        <span class="right">
					Copyright © 2021-2022 zizizilan.com
				</span>
    </div>
    <!-- 遮盖层 -->
    <div class="pear-cover"></div>
    <!-- 加载动画 -->
    <div class="loader-main">
        <!-- 动画对象 -->
        <div class="loader"></div>
    </div>
</div>
<!-- 移 动 端 便 捷 操 作 -->
<div class="pear-collapsed-pe collapse">
    <a href="#" class="layui-icon layui-icon-shrink-right"></a>
</div>
<!-- 依 赖 脚 本 -->
<script th:src="@{pearAdminLayUI/component/layui/layui.js}"></script>
<script th:src="@{pearAdminLayUI/component/pear/pear.js}"></script>
<!-- 框 架 初 始 化 -->
<script>
    layui.use(['admin','jquery','popup'], function() {
        const $ = layui.jquery;
        const admin = layui.admin;
        const popup = layui.popup;
        admin.setConfigType("json");
        admin.setConfigPath("pearAdminLayUI/config/pear.config.json");
        admin.render();
        // 登出逻辑
        admin.logout(function(){
            popup.success("注销成功",function(){
                location.href = "login.html";
            })
            // 注销逻辑 返回 true / false
            return true;
        })
        // 消息点击回调
        admin.message(function(id, title, context, form) {});
    })
</script>
</body>
</html>